package com.ruiyi.subway.service;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import com.ruiyi.subway.dao.SupperDao;
import com.ruiyi.subway.utils.SpringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;



public abstract class SuperService {

protected Logger log = LoggerFactory.getLogger(getClass());
	
	@Autowired
	protected SupperDao superDao;
	
	/**
	 * 取得真实的web路径
	 * @return
	 */
	protected String getWebPath(){
		return SpringUtils.getApplication().getRealPath("/");
	}
	
	/**
	 * 取得request
	 * @return
	 */
	protected HttpServletRequest getRequest(){
		return SpringUtils.getRequest();
	}
	
	/**
	 * 取得session
	 * @return
	 */
	protected HttpSession getSession(){
		return SpringUtils.getSession();
	}
	
}
